<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<c:set var="uploadPath" value="${redis:getSysConfig('uploadFileVisitRoot')}"/>
<script type="text/javascript">
    /**
     * 查看商品答疑详情
     */
    function detailInfo(id){
        $.ajax({
            type: "POST",
            dataType: "JSON",
            url: "${basePath}/back/productInfoQuestion/getShopProductQuestionInfo.sjson",
            data: {productInfoQuestionId:id},
            success: function(result){
                var data = JSON.parse(result.data);
                /**重置详情页中所有html展示信息**/
                resetDetailTable("detailTable");
                /**设置展示信息**/
                $("#d_productName").html(data[0].productName);
                $("#d_customerName").html(data[0].customerName);
                $("#d_shopName").html(data[0].shopName);
                <c:forEach items="${redis:getBasicKeyBook('askType')}" var="kb">
                if(data[0].askType==${kb.value}){
                    $("#d_askType").html("${kb.name}");
                }
                </c:forEach>
                $("#d_askQuestion").html(data[0].askQuestion);

                if(data[0].askTime!=""&&data[0].askTime!=undefined){
                    $("#d_askTime").html(new Date(data[0].askTime).Format("yyyy-MM-dd hh:mm:ss"));
                }

                $("#d_answerName").html(data[0].answerName);
                $("#d_answer").html(data[0].answer);

                if(data[0].answerTime!=""&&data[0].answerTime!=undefined){
                    $("#d_answerTime").html(new Date(data[0].answerTime).Format("yyyy-MM-dd hh:mm:ss"));
                }

                if(data[0].status==1){
                    $("#d_status").html("<font class='color_002'>未通过</font>");
                }else if(data[0].status==2){
                    $("#d_status").html("<font class='color_001'>已通过</font>");
                }else if(data[0].status==3){
                    $("#d_status").html("<font class='color_003'>待审核</font>");
                }

                $("#d_userName").html(data[0].userName);

                if(data[0].checkTime!=""&&data[0].checkTime!=undefined){
                    $("#d_checkTime").html(new Date(data[0].checkTime).Format("yyyy-MM-dd hh:mm:ss"));
                }

                if(data[0].shopStatus==1){
                    $("#d_shopStatus").html("<font class='color_002'>未通过审核</font>");
                }else if(data[0].shopStatus==2){
                    $("#d_shopStatus").html("<font class='color_001'>通过审核</font>");
                }else if(data[0].shopStatus==3){
                    $("#d_shopStatus").html("<font class='color_003'>待审核</font>");
                }

                if(data[0].createTime!=""&&data[0].createTime!=undefined){
                    $("#d_createTime").html(new Date(data[0].createTime).Format("yyyy-MM-dd hh:mm:ss"));
                }

                if(data[0].updateTime!=""&&data[0].updateTime!=undefined){
                    $("#d_updateTime").html(new Date(data[0].updateTime).Format("yyyy-MM-dd hh:mm:ss"));
                }
            }
        });
    }
</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">商品答疑详情</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<tr>
						<td class="toright_td" width="150px">商品名称:</td>
						<td  class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_productName"></span></td>
						<td class="toright_td" width="150px">会员名称:</td>
						<td  class="toleft_td" width="250px">&nbsp;&nbsp;<span id="d_customerName"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">店铺名称:</td>
						<td  class="toleft_td" >&nbsp;&nbsp;<span id="d_shopName"></span></td>
						<td class="toright_td" width="150px">店铺审核状态:</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_shopStatus"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">资询类型:</td>
						<td  class="toleft_td" >&nbsp;&nbsp;<span id="d_askType"></span></td>
						<td class="toright_td" width="150px">资询时间:</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_askTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">资询内容:</td>
						<td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_askQuestion"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">答疑人名称:</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_answerName"></span></td>
						<td class="toright_td" width="150px">答复时间:</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_answerTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">平台答复:</td>
						<td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_answer"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">审核人名称:</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_userName"></span></td>
						<td class="toright_td" width="150px">审核时间:</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_checkTime"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">审核状态:</td>
						<td  class="toleft_td" colspan="3">&nbsp;&nbsp;<span id="d_status"></span></td>
					</tr>
					<tr>
						<td class="toright_td" width="150px">创建时间:</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_createTime"></span></td>
						<td class="toright_td" width="150px">修改时间:</td>
						<td  class="toleft_td">&nbsp;&nbsp;<span id="d_updateTime"></span></td>
					</tr>

				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>